<template>
    <div class="pop-password-set">
        <el-drawer
            title="密码管理"
            :visible.sync="is_drawer"
            class="drawer-box"
        >
            <div class="context-box">
                <el-form
                    ref="form"
                    :model="form.pw"
                    label-width="80px"
                    :rules="rules"
                >
                    <el-form-item label="密码类型">
                        <el-radio v-model="form.pw.type" label="1"
                            >一人一码</el-radio
                        >
                        <el-radio v-model="form.pw.type" label="2"
                            >访问通用码</el-radio
                        >
                    </el-form-item>
                    <el-form-item prop="v">
                        <el-input v-model="form.pw.v" maxlength="6"></el-input>
                    </el-form-item>
                </el-form>
            </div>
        </el-drawer>
    </div>
</template>

<script>
// import xxx from '@/components/comm/xxx.vue';
export default {
    props: ["form"],
    components: {},
    computed: {},
    data() {
        return {
            is_drawer: false,
            rules: {
                v: [
                    {
                        required: true,
                        message: "通用码不能为空",
                        trigger: "blur",
                    },
                ],
            },
        };
    },
    created() {},
    mounted() {},
    methods: {
        initData() {
            this.is_drawer = true;
        },
    },
};
</script>

<style lang="scss" scoped >
.drawer-box {
    .context-box {
        padding: 0 20px;
    }
}
</style>
